Row

confirmed

4161

People tested

23471

Active/Recovered Cases

NA

death

346

Row

Map

Daily cumulative cases

Row

Zipcode cases

Town cases

Row

Daily counts

Daily counts

date confirmed new active recovered deaths
56 2020-05-08 4161 222 NA NA 346
55 2020-05-07 3939 0 NA NA 323
54 2020-05-06 3939 190 NA NA 323
53 2020-05-05 3749 0 NA NA 308
52 2020-05-04 3749 268 NA NA 308
51 2020-05-03 3481 0 NA NA 283
50 2020-05-02 3481 0 NA NA 283
49 2020-05-01 3481 71 NA NA 283
48 2020-04-30 3410 95 NA NA 266
47 2020-04-29 3315 91 NA NA 254
46 2020-04-28 3224 163 NA NA 245
45 2020-04-27 3061 65 NA NA 207
44 2020-04-26 2996 139 NA NA 207
43 2020-04-25 2857 119 NA NA 207
42 2020-04-24 2738 144 NA NA 198
41 2020-04-23 2594 89 NA NA 188
40 2020-04-22 2505 221 NA NA 188
39 2020-04-21 2284 63 NA NA 177
38 2020-04-20 2221 29 NA NA 162
37 2020-04-19 2192 65 NA NA 135
36 2020-04-18 2127 104 NA NA 131
35 2020-04-17 2023 72 NA NA 115
34 2020-04-16 1951 139 NA NA 107
33 2020-04-15 1812 82 NA NA 104
32 2020-04-14 1730 69 1178 479 73
31 2020-04-13 1661 37 1116 479 66
30 2020-04-12 1624 66 1084 479 61
29 2020-04-11 1558 52 1071 430 57
28 2020-04-10 1506 66 1019 430 57
27 2020-04-09 1440 95 989 398 53
26 2020-04-08 1345 110 950 349 46
25 2020-04-07 1235 72 893 303 39
24 2020-04-06 1163 104 910 223 30
23 2020-04-05 1059 114 861 171 27
22 2020-04-04 945 143 758 161 26
21 2020-04-03 802 68 639 141 22
20 2020-04-02 734 131 614 101 19
19 2020-04-01 603 50 510 81 12
18 2020-03-31 553 90 481 62 10
17 2020-03-30 463 49 402 53 8
16 2020-03-29 414 34 375 32 7
15 2020-03-28 380 70 347 27 6
14 2020-03-27 310 89 277 27 6
13 2020-03-26 221 75 200 16 5
12 2020-03-25 146 25 139 5 2
11 2020-03-24 121 25 121 0 0
10 2020-03-23 96 32 96 0 0
9 2020-03-22 64 8 64 0 0
8 2020-03-21 56 9 56 0 0
7 2020-03-20 47 18 47 0 0
6 2020-03-19 29 2 29 0 0
5 2020-03-18 27 7 27 0 0
4 2020-03-17 20 13 20 0 0
3 2020-03-16 7 0 7 0 0
2 2020-03-15 7 4 7 0 0
1 2020-03-14 3 3 3 0 0
---
title: COVID19(Erie county)
date: "`r gsub('\\(updated |\\ EST)|/2020', '', attributes(Counts$counts)$update.time)`"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    navbar:
      - { icon: fa-github, href: "https://github.com/hubentu/COVID19Erie"}
      - { title: "Erie Case Map", href: "https://erieny.maps.arcgis.com/apps/opsdashboard/index.html#/dd7f1c0c352e4192ab162a1dfadc58e1"}
      - { title: "Global Map", href: "https://coronavirus.jhu.edu/map.html"}
    social: menu
    source_code: embed
    vertical_layout: scroll
---

```{r setup, include=FALSE}
library(flexdashboard)
library(fontawesome)
## library(COVID19Erie)
## pubExposed <- exposedPub()
```

```{r}
Counts <- caseCounts()
counts <- Counts$counts
ctable1 <- rbind(counts,
                c(town = "Total", colSums(counts[,-1])))
ycount <- historyCount$confirmed[historyCount$date == Sys.Date() - 1]
ncount <- attributes(counts)$total.confirmed - ycount
```

Row {data-width=300}
-----------------------------------------------------------------------

### confirmed {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.confirmed,
  caption = paste0("Total confirmed cases (+", ncount, ")"),
  icon = "fas fa-ambulance",
  color = "purple"
)
```

### People tested
```{r}
valueBox(
  value = attributes(counts)$people.tested,
  caption = "People tested",
  icon = "fas fa-hospital-user",
  color = "#1f77b4"
)
```

### Active/Recovered Cases {.value-box}
```{r}
valueBox(
  value = attributes(counts)$active.cases,
  caption = "Active cases",
  icon = "fas fa-hospital-user",
  color = "forestgreen"
)
```












### death {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.deaths,
  caption = "Death cases",
  icon = "fas fa-heart-broken",
  color = "#474747"
)
```


Row {data-height=600}
-----------------------------------------------------------------------
    
### Map
    
```{r}
caseMap(Counts, pubExposed, titlePos = NULL)
```

### Daily cumulative cases
```{r}
countPlot(historyCount)
```

Row
---------------------------------------------------------------------

### Zipcode cases
```{r}
library(DT)
datatable(Counts$zipCounts, options = list(scrollX = T))
```

### Town cases

```{r}
## library(knitr)
## library(kableExtra)
## kable(ctable1,
##       caption = "COVID19 cases (Erie county)") %>%
##     kable_styling(full_width = TRUE) %>% 
##     footnote(general = c(paste("Last updated:", attributes(counts)$update.time),
##                          "[Data Source](https://erieny.maps.arcgis.com/apps/opsdashboard/index.html#/dd7f1c0c352e4192ab162a1dfadc58e1)",
##                          "[Public Advisories](http://www2.erie.gov/health/index.php?q=public-advisories)",
##                          "The data is only for educational and academic research purposes.")) %>%
## scroll_box(height = "600px")
datatable(ctable1[,1:2], options = list(scrollX = T))
```

Row
----------------------------------------------------------------------

### Daily counts {.no-mobile}
```{r}
datatable(historyCount[order(historyCount$date, decreasing = TRUE),],
          extensions = 'Scroller',
          options = list(scrollX = TRUE))
```

### Daily counts {.mobile}
```{r}
library(knitr)
library(kableExtra)
kable(historyCount[order(historyCount$date, decreasing = TRUE),]) %>%
    kable_styling(font_size = 8)%>%
    scroll_box(height = "600px", width = "100%")
```